<form class="layui-form seller-alone-form" method="post" action="{:url('Wechat/doEdit')}">
    <div class="warning-msg">
        <div class="warning-msg-content">
            <p>此设置关系到整个教材发放模块的默认时间，请谨慎操作！</p>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>当前年度：</label>
        <div class="layui-input-inline" id="year_box">
            <select name="year" lay-filter="year" id="year"  required lay-verify="required" list="year_list" lay-search>
                <option value=""></option>
                <datalist  id="year_list" lay-search>
                    {volist name="yearList" id="yearList"}
                    <option value="{$yearList.id}" {eq name="$data.year.value" value="$yearList.year"}selected{/eq}>{$yearList.year}</option>
                    {/volist}
                </datalist>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label seller-inline-2"><i class="required-color">*</i>当前季度：</label>
        <div class="layui-input-inline" id="season_box">
            <select name="season" lay-filter="season" id="season" required lay-verify="required" list="season_list" lay-search>
                <option value=""></option>
                <datalist  id="season_list" lay-search>
                    {volist name="seasonList" id="seasonList"}
                    <option value="{$seasonList.season_id}" {eq name="$data.season.value" value="$seasonList.season_id"}selected{/eq}>{$seasonList.season_name}</option>
                    {/volist}
                </datalist>
            </select>
        </div>
    </div>
    <br />
    <div class="layui-form-item">
        <div class="layui-input-block">
            {:zlserverToken()}
            <button class="layui-btn " lay-submit="" lay-filter="save">保存</button>
        </div>
    </div>
</form>
<script>
    layui.use(['form','laytpl','upload'], function() {
        var $ = layui.jquery;
        var form = layui.form;
        form.render();
        form.on('submit(save)', function(data){
            formData = data.field;
            if(!formData){
                layer.msg('请先完善数据', {time: 1300});
                return false;
            }

            JsPost('{:url("BookPlan/doSettingEdit")}',formData,function (e) {
                if(e.status === true){
                    layer.msg(e.msg, {time: 1300}, function(){
                        window.location.reload();
                    });
                }else{
                    layer.msg(e.msg, {time: 1300});
                }
            });
            return false;
        });
    });
</script>
<style>
    .seller-inline-2{
        width: 140px !important;
    }
</style>